import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                {
                    // orderlist
                    path: '/orderlist',
                    component: () => import(/* webpackChunkName: "orderlist" */ '../components/page/OrderList.vue'),
                    meta: { title: '订单列表' }
                },
                {
                    // helperlist
                    path: '/helperlist',
                    component: () => import(/* webpackChunkName: "helperlist" */ '../components/page/HelperCate.vue'),
                    meta: { title: '类别列表' }
                },
                {
                    // queslist
                    path: '/queslist',
                    component: () => import(/* webpackChunkName: "queslist" */ '../components/page/HelperQues.vue'),
                    meta: { title: '问答列表' }
                },
                {
                    // rolelist
                    path: '/rolelist',
                    component: () => import(/* webpackChunkName: "rolelist" */ '../components/page/RoleList.vue'),
                    meta: { title: '角色列表' }
                },
                {
                    // userlist
                    path: '/userlist',
                    component: () => import(/* webpackChunkName: "userlist" */ '../components/page/UserList.vue'),
                    meta: { title: '用户列表' }
                },
                {
                    // userauth
                    path: '/userauth',
                    component: () => import(/* webpackChunkName: "userauth" */ '../components/page/AuthPwUserList.vue'),
                    meta: { title: '陪玩审核' }
                },
                {
                    // Manager
                    path: '/managerlist',
                    component: () => import(/* webpackChunkName: "managerlist" */ '../components/page/ManagerList.vue'),
                    meta: { title: '管理员列表' }
                },
                {
                    // categorylist
                    path: '/categorylist',
                    component: () => import(/* webpackChunkName: "categorylist" */ '../components/page/GoodsCategory.vue'),
                    meta: { title: '类别列表' }
                },
                {
                    // goodslist
                    path: '/goodslist',
                    component: () => import(/* webpackChunkName: "goodslist" */ '../components/page/GoodsList.vue'),
                    meta: { title: '商品列表' }
                },
                {
                    // goodsauth
                    path: '/goodsauth',
                    component: () => import(/* webpackChunkName: "goodsauth" */ '../components/page/AuthGoodsList.vue'),
                    meta: { title: '商品审核' }
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
